<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkSpinButton</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="NumericEntry.html" title="数字/文本数据输入项">
<link rel="prev" href="gtk3-GtkVScale.html" title="GtkVScale">
<link rel="next" href="gtk3-GtkEditable.html" title="GtkEditable">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkVScale.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="NumericEntry.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkEditable.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkSpinButton.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkSpinButton.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkSpinButton"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkSpinButton.top_of_page"></a>GtkSpinButton</span></h2>
<p>GtkSpinButton — Retrieve an integer or floating-point number from
    the user</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkSpinButton.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton">GtkSpinButton</a>;
enum                <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</a>;
enum                <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinType" title="enum GtkSpinType">GtkSpinType</a>;
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-configure" title="gtk_spin_button_configure ()">gtk_spin_button_configure</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> climb_rate</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-new" title="gtk_spin_button_new ()">gtk_spin_button_new</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> climb_rate</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-new-with-range" title="gtk_spin_button_new_with_range ()">gtk_spin_button_new_with_range</a>      (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> max</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> step</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-adjustment" title="gtk_spin_button_set_adjustment ()">gtk_spin_button_set_adjustment</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);
<a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> *     <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-adjustment" title="gtk_spin_button_get_adjustment ()">gtk_spin_button_get_adjustment</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-digits" title="gtk_spin_button_set_digits ()">gtk_spin_button_set_digits</a>          (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-increments" title="gtk_spin_button_set_increments ()">gtk_spin_button_set_increments</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> step</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> page</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-range" title="gtk_spin_button_set_range ()">gtk_spin_button_set_range</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> max</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-value-as-int" title="gtk_spin_button_get_value_as_int ()">gtk_spin_button_get_value_as_int</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-value" title="gtk_spin_button_set_value ()">gtk_spin_button_set_value</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-update-policy" title="gtk_spin_button_set_update_policy ()">gtk_spin_button_set_update_policy</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy"><span class="type">GtkSpinButtonUpdatePolicy</span></a> policy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-numeric" title="gtk_spin_button_set_numeric ()">gtk_spin_button_set_numeric</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> numeric</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-spin" title="gtk_spin_button_spin ()">gtk_spin_button_spin</a>                (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinType" title="enum GtkSpinType"><span class="type">GtkSpinType</span></a> direction</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> increment</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-wrap" title="gtk_spin_button_set_wrap ()">gtk_spin_button_set_wrap</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> wrap</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-snap-to-ticks" title="gtk_spin_button_set_snap_to_ticks ()">gtk_spin_button_set_snap_to_ticks</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> snap_to_ticks</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-update" title="gtk_spin_button_update ()">gtk_spin_button_update</a>              (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-digits" title="gtk_spin_button_get_digits ()">gtk_spin_button_get_digits</a>          (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-increments" title="gtk_spin_button_get_increments ()">gtk_spin_button_get_increments</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *step</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *page</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-numeric" title="gtk_spin_button_get_numeric ()">gtk_spin_button_get_numeric</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-range" title="gtk_spin_button_get_range ()">gtk_spin_button_get_range</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *max</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-snap-to-ticks" title="gtk_spin_button_get_snap_to_ticks ()">gtk_spin_button_get_snap_to_ticks</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy"><span class="returnvalue">GtkSpinButtonUpdatePolicy</span></a> <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-update-policy" title="gtk_spin_button_get_update_policy ()">gtk_spin_button_get_update_policy</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-value" title="gtk_spin_button_get_value ()">gtk_spin_button_get_value</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-get-wrap" title="gtk_spin_button_get_wrap ()">gtk_spin_button_get_wrap</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);
#define             <a class="link" href="gtk3-GtkSpinButton.html#GTK-INPUT-ERROR:CAPS" title="GTK_INPUT_ERROR">GTK_INPUT_ERROR</a>
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkSpinButton.description"></a><h2>Description</h2>
<p>
A <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> is an ideal way to allow the user to set the value of
some attribute. Rather than having to directly type a number into a
<a class="link" href="gtk3-GtkEntry.html#GtkEntry" title="struct GtkEntry"><span class="type">GtkEntry</span></a>, GtkSpinButton allows the user to click on one of two arrows
to increment or decrement the displayed value. A value can still be
typed in, with the bonus that it can be checked to ensure it is in a
given range.
</p>
<p>
The main properties of a GtkSpinButton are through an adjustment.
See the <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> section for more details about an adjustment's
properties.
</p>
<p>
</p>
<div class="example">
<a name="id3386505"></a><p class="title"><b>Example 52. Using a GtkSpinButton to get an integer</b></p>
<div class="example-contents"><pre class="programlisting">
/* Provides a function to retrieve an integer value from a
 * GtkSpinButton and creates a spin button to model percentage
 * values.
 */

gint
grab_int_value (GtkSpinButton *button,
                gpointer       user_data)
{
  return gtk_spin_button_get_value_as_int (button);
}

void
create_integer_spin_button (void)
{

  GtkWidget *window, *button;
  GtkAdjustment *adjustment;

  adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (window), 5);

  /* creates the spinbutton, with no decimal places */
  button = gtk_spin_button_new (adjustment, 1.0, 0);
  gtk_container_add (GTK_CONTAINER (window), button);

  gtk_widget_show_all (window);
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="example">
<a name="id3386534"></a><p class="title"><b>Example 53. Using a GtkSpinButton to get a floating point value</b></p>
<div class="example-contents"><pre class="programlisting">
/* Provides a function to retrieve a floating point value from a
 * GtkSpinButton, and creates a high precision spin button.
 */

gfloat
grab_float_value (GtkSpinButton *button,
                  gpointer       user_data)
{
  return gtk_spin_button_get_value (button);
}

void
create_floating_spin_button (void)
{
  GtkWidget *window, *button;
  GtkAdjustment *adjustment;

  adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (window), 5);

  /* creates the spinbutton, with three decimal places */
  button = gtk_spin_button_new (adjustment, 0.001, 3);
  gtk_container_add (GTK_CONTAINER (window), button);

  gtk_widget_show_all (window);
}
</pre></div>
</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkSpinButton.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkSpinButton"></a><h3>struct GtkSpinButton</h3>
<pre class="programlisting">struct GtkSpinButton {
  GtkEntry entry;
};
</pre>
<p>
The <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> struct contains only private data and should
not be directly modified.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSpinButtonUpdatePolicy"></a><h3>enum GtkSpinButtonUpdatePolicy</h3>
<pre class="programlisting">typedef enum {
  GTK_UPDATE_ALWAYS,
  GTK_UPDATE_IF_VALID
} GtkSpinButtonUpdatePolicy;
</pre>
<p>
The spin button update policy determines whether the spin button displays
values even if they are outside the bounds of its adjustment.
See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-update-policy" title="gtk_spin_button_set_update_policy ()"><code class="function">gtk_spin_button_set_update_policy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-UPDATE-ALWAYS:CAPS"></a><span class="term"><code class="literal">GTK_UPDATE_ALWAYS</code></span></p></td>
<td>When refreshing your <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>, the value is
    always displayed
</td>
</tr>
<tr>
<td><p><a name="GTK-UPDATE-IF-VALID:CAPS"></a><span class="term"><code class="literal">GTK_UPDATE_IF_VALID</code></span></p></td>
<td>When refreshing your <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>, the value is
    only displayed if it is valid within the bounds of the spin button's
    adjustment
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GtkSpinType"></a><h3>enum GtkSpinType</h3>
<pre class="programlisting">typedef enum {
  GTK_SPIN_STEP_FORWARD,
  GTK_SPIN_STEP_BACKWARD,
  GTK_SPIN_PAGE_FORWARD,
  GTK_SPIN_PAGE_BACKWARD,
  GTK_SPIN_HOME,
  GTK_SPIN_END,
  GTK_SPIN_USER_DEFINED
} GtkSpinType;
</pre>
<p>
The values of the GtkSpinType enumeration are used to specify the
change to make in <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-spin" title="gtk_spin_button_spin ()"><code class="function">gtk_spin_button_spin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-SPIN-STEP-FORWARD:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_STEP_FORWARD</code></span></p></td>
<td>Increment by the adjustments step increment.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-STEP-BACKWARD:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_STEP_BACKWARD</code></span></p></td>
<td>Decrement by the adjustments step increment.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-PAGE-FORWARD:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_PAGE_FORWARD</code></span></p></td>
<td>Increment by the adjustments page increment.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-PAGE-BACKWARD:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_PAGE_BACKWARD</code></span></p></td>
<td>Decrement by the adjustments page increment.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-HOME:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_HOME</code></span></p></td>
<td>Go to the adjustments lower bound.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-END:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_END</code></span></p></td>
<td>Go to the adjustments upper bound.
</td>
</tr>
<tr>
<td><p><a name="GTK-SPIN-USER-DEFINED:CAPS"></a><span class="term"><code class="literal">GTK_SPIN_USER_DEFINED</code></span></p></td>
<td>Change by a specified amount.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-configure"></a><h3>gtk_spin_button_configure ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_configure           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> climb_rate</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);</pre>
<p>
Changes the properties of an existing spin button. The adjustment,
climb rate, and number of decimal places are all changed accordingly,
after this function call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>climb_rate</code></em> :</span></p></td>
<td>the new climb rate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>digits</code></em> :</span></p></td>
<td>the number of decimal places to display in the spin button</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-new"></a><h3>gtk_spin_button_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_spin_button_new                 (<em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> climb_rate</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> object that this spin
button should use, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>climb_rate</code></em> :</span></p></td>
<td>specifies how much the spin button changes when an arrow
is clicked on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>digits</code></em> :</span></p></td>
<td>the number of decimal places to display</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The new spin button as a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-new-with-range"></a><h3>gtk_spin_button_new_with_range ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_spin_button_new_with_range      (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> max</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> step</code></em>);</pre>
<p>
This is a convenience constructor that allows creation of a numeric
<a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> without manually creating an adjustment. The value is
initially set to the minimum value and a page increment of 10 * <em class="parameter"><code>step</code></em>
is the default. The precision of the spin button is equivalent to the
precision of <em class="parameter"><code>step</code></em>.
</p>
<p>
Note that the way in which the precision is derived works best if <em class="parameter"><code>step</code></em>
is a power of ten. If the resulting precision is not suitable for your
needs, use <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-digits" title="gtk_spin_button_set_digits ()"><code class="function">gtk_spin_button_set_digits()</code></a> to correct it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>min</code></em> :</span></p></td>
<td>Minimum allowable value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td>
<td>Maximum allowable value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>step</code></em> :</span></p></td>
<td>Increment added or subtracted by spinning the widget</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The new spin button as a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-adjustment"></a><h3>gtk_spin_button_set_adjustment ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_adjustment      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);</pre>
<p>
Replaces the <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> associated with <em class="parameter"><code>spin_button</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> to replace the existing adjustment</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-adjustment"></a><h3>gtk_spin_button_get_adjustment ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> *     gtk_spin_button_get_adjustment      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Get the adjustment associated with a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkAdjustment.html#GtkAdjustment" title="struct GtkAdjustment"><span class="type">GtkAdjustment</span></a> of <em class="parameter"><code>spin_button</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-digits"></a><h3>gtk_spin_button_set_digits ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_digits          (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> digits</code></em>);</pre>
<p>
Set the precision to be displayed by <em class="parameter"><code>spin_button</code></em>. Up to 20 digit precision
is allowed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>digits</code></em> :</span></p></td>
<td>the number of digits after the decimal point to be displayed for the spin button's value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-increments"></a><h3>gtk_spin_button_set_increments ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_increments      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> step</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> page</code></em>);</pre>
<p>
Sets the step and page increments for spin_button.  This affects how
quickly the value changes when the spin button's arrows are activated.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>step</code></em> :</span></p></td>
<td>increment applied for a button 1 press.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
<td>increment applied for a button 2 press.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-range"></a><h3>gtk_spin_button_set_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_range           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> max</code></em>);</pre>
<p>
Sets the minimum and maximum allowable values for <em class="parameter"><code>spin_button</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>min</code></em> :</span></p></td>
<td>minimum allowable value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td>
<td>maximum allowable value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-value-as-int"></a><h3>gtk_spin_button_get_value_as_int ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_spin_button_get_value_as_int    (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Get the value <em class="parameter"><code>spin_button</code></em> represented as an integer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the value of <em class="parameter"><code>spin_button</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-value"></a><h3>gtk_spin_button_set_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_value           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>);</pre>
<p>
Sets the value of <em class="parameter"><code>spin_button</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the new value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-update-policy"></a><h3>gtk_spin_button_set_update_policy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_update_policy   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy"><span class="type">GtkSpinButtonUpdatePolicy</span></a> policy</code></em>);</pre>
<p>
Sets the update behavior of a spin button.
This determines wether the spin button is always updated
or only when a valid value is set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>policy</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy"><span class="type">GtkSpinButtonUpdatePolicy</span></a> value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-numeric"></a><h3>gtk_spin_button_set_numeric ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_numeric         (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> numeric</code></em>);</pre>
<p>
Sets the flag that determines if non-numeric text can be typed
into the spin button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>numeric</code></em> :</span></p></td>
<td>flag indicating if only numeric entry is allowed</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-spin"></a><h3>gtk_spin_button_spin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_spin                (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinType" title="enum GtkSpinType"><span class="type">GtkSpinType</span></a> direction</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> increment</code></em>);</pre>
<p>
Increment or decrement a spin button's value in a specified
direction by a specified amount.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinType" title="enum GtkSpinType"><span class="type">GtkSpinType</span></a> indicating the direction to spin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>increment</code></em> :</span></p></td>
<td>step increment to apply in the specified direction</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-wrap"></a><h3>gtk_spin_button_set_wrap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_wrap            (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> wrap</code></em>);</pre>
<p>
Sets the flag that determines if a spin button value wraps
around to the opposite limit when the upper or lower limit
of the range is exceeded.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrap</code></em> :</span></p></td>
<td>a flag indicating if wrapping behavior is performed</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-set-snap-to-ticks"></a><h3>gtk_spin_button_set_snap_to_ticks ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_set_snap_to_ticks   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> snap_to_ticks</code></em>);</pre>
<p>
Sets the policy as to whether values are corrected to the
nearest step increment when a spin button is activated after
providing an invalid value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>snap_to_ticks</code></em> :</span></p></td>
<td>a flag indicating if invalid values should be corrected</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-update"></a><h3>gtk_spin_button_update ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_update              (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Manually force an update of the spin button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-digits"></a><h3>gtk_spin_button_get_digits ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_spin_button_get_digits          (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Fetches the precision of <em class="parameter"><code>spin_button</code></em>. See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-digits" title="gtk_spin_button_set_digits ()"><code class="function">gtk_spin_button_set_digits()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current precision</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-increments"></a><h3>gtk_spin_button_get_increments ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_get_increments      (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *step</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *page</code></em>);</pre>
<p>
Gets the current step and page the increments used by <em class="parameter"><code>spin_button</code></em>. See
<a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-increments" title="gtk_spin_button_set_increments ()"><code class="function">gtk_spin_button_set_increments()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>step</code></em> :</span></p></td>
<td>location to store step increment, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
<td>location to store page increment, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-numeric"></a><h3>gtk_spin_button_get_numeric ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_spin_button_get_numeric         (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Returns whether non-numeric text can be typed into the spin button.
See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-numeric" title="gtk_spin_button_set_numeric ()"><code class="function">gtk_spin_button_set_numeric()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if only numeric text can be entered</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-range"></a><h3>gtk_spin_button_get_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_spin_button_get_range           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *min</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *max</code></em>);</pre>
<p>
Gets the range allowed for <em class="parameter"><code>spin_button</code></em>.
See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-range" title="gtk_spin_button_set_range ()"><code class="function">gtk_spin_button_set_range()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>min</code></em> :</span></p></td>
<td>location to store minimum allowed value, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td>
<td>location to store maximum allowed value, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-snap-to-ticks"></a><h3>gtk_spin_button_get_snap_to_ticks ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_spin_button_get_snap_to_ticks   (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Returns whether the values are corrected to the nearest step.
See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-snap-to-ticks" title="gtk_spin_button_set_snap_to_ticks ()"><code class="function">gtk_spin_button_set_snap_to_ticks()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if values are snapped to the nearest step</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-update-policy"></a><h3>gtk_spin_button_get_update_policy ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButtonUpdatePolicy" title="enum GtkSpinButtonUpdatePolicy"><span class="returnvalue">GtkSpinButtonUpdatePolicy</span></a> gtk_spin_button_get_update_policy
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Gets the update behavior of a spin button.
See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-update-policy" title="gtk_spin_button_set_update_policy ()"><code class="function">gtk_spin_button_set_update_policy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current update policy</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-value"></a><h3>gtk_spin_button_get_value ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gtk_spin_button_get_value           (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Get the value in the <em class="parameter"><code>spin_button</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the value of <em class="parameter"><code>spin_button</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-spin-button-get-wrap"></a><h3>gtk_spin_button_get_wrap ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_spin_button_get_wrap            (<em class="parameter"><code><a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a> *spin_button</code></em>);</pre>
<p>
Returns whether the spin button's value wraps around to the
opposite limit when the upper or lower limit of the range is
exceeded. See <a class="link" href="gtk3-GtkSpinButton.html#gtk-spin-button-set-wrap" title="gtk_spin_button_set_wrap ()"><code class="function">gtk_spin_button_set_wrap()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSpinButton.html#GtkSpinButton" title="struct GtkSpinButton"><span class="type">GtkSpinButton</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the spin button wraps around</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GTK-INPUT-ERROR:CAPS"></a><h3>GTK_INPUT_ERROR</h3>
<pre class="programlisting">#define GTK_INPUT_ERROR -1
</pre>
<p>
Constant to return from a signal handler for the <span class="type">"input"</span>
signal in case of conversion failure.
</p>
</div>
</div>
<div class="refsect1">
<a name="gtk3-GtkSpinButton.see-also"></a><h2>See Also</h2>
<a class="link" href="gtk3-GtkEntry.html#GtkEntry" title="struct GtkEntry"><span class="type">GtkEntry</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>